<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateGroupsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        //
        Schema::create('groups', function (Blueprint $table){
            $table->increments('id')->comment('自增主键');  //自增主键
            $table->string('class')->comment('班级名称');   //班级名称
            $table->integer('grade_id')->comment('年级');  //年级
            $table->integer('college_id')->comment('学院');//学院
            $table->integer('major_id')->comment('专业');  //专业
            $table->integer('number')->comment('人数'); //人数
            $table->softDeletes();             //软删除
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('groups');
    }
}
